/**
 * @description image element
 * @author wangfupeng
 */

//【注意】需要把自定义的 Element 引入到最外层的 custom-types.d.ts

type EmptyText = {
	text: '';
};

export type ImageStyle = {
	width?: string;
	height?: string;
	verticalAlign?: string;
};

export type ImageAttrs = {

}

export type DavinciImage = {
	type: 'davinci-image';
	src: string;
	alt?: string;
	href?: string;
	style?: ImageStyle;
	color?: string; //编辑器中元素颜色
	content: string //资源文字内容
	selectedColor?: string; //编辑器中元素被选中时的颜色
	backgroundColor?: string; //元素背景颜色
	children: EmptyText[];
	undeletable: true;
	contextmenuCan: true
	clickCan: true,
	attrs: ImageAttrs
} | {
	type: 'davinci-image';
	src: string;
	alt?: string;
	href?: string;
	style?: ImageStyle;
	color?: string; //编辑器中元素颜色
	selectedColor?: string; //编辑器中元素被选中时的颜色
	backgroundColor?: string; //元素背景颜色
	children: EmptyText[];
	undeletable?: false;
	contextmenuCan?: false
	clickCan?: false
	attrs: ImageAttrs
};
